using System;
using System.ComponentModel.DataAnnotations;
using EIMS.Models.Enums;

namespace EIMS.Models.ViewModels
{
    public class SupplierTransactionViewModel
    {
        public int Id { get; set; }
        
        [Required(ErrorMessage = "供应商ID不能为空")]
        public int SupplierId { get; set; }
        
        [Display(Name = "供应商名称")]
        public string? SupplierName { get; set; }
        
        [Required(ErrorMessage = "交易编号不能为空")]
        [StringLength(50, ErrorMessage = "交易编号不能超过50个字符")]
        [Display(Name = "交易编号")]
        public string? TransactionNumber { get; set; }
        
        [Required(ErrorMessage = "交易日期不能为空")]
        [DataType(DataType.Date)]
        [Display(Name = "交易日期")]
        public DateTime TransactionDate { get; set; }
        
        [Required(ErrorMessage = "金额不能为空")]
        [Range(0.01, double.MaxValue, ErrorMessage = "金额必须大于0")]
        [DataType(DataType.Currency)]
        [Display(Name = "金额")]
        public decimal Amount { get; set; }
        
        [Required(ErrorMessage = "交易类型不能为空")]
        [Display(Name = "交易类型")]
        public TransactionType TransactionType { get; set; }
        
        [Display(Name = "支付方式")]
        public PaymentMethod PaymentMethod { get; set; }
        
        [Display(Name = "支付状态")]
        public PaymentStatus PaymentStatus { get; set; }
        
        [StringLength(500, ErrorMessage = "交易说明不能超过500个字符")]
        [Display(Name = "交易说明")]
        public string? Description { get; set; }
    }
} 